const {withModuleFederationPlugin, share} = require('@angular-architects/module-federation/webpack');


module.exports = withModuleFederationPlugin({

  name: 'plugin1',

  exposes: {
    './OrderModule': './projects/plugin1/src/app/order/order.module.ts',
  },

  shared: share({
    '@angular/core': {
      singleton: true,
      strictVersion: true,
      requiredVersion: 'auto',
    },
    '@angular/common': {
      singleton: true,
      strictVersion: true,
      requiredVersion: 'auto',
    },
    '@angular/common/http': {
      singleton: true,
      strictVersion: true,
      requiredVersion: 'auto',
    },
    '@angular/router': {
      singleton: true,
      strictVersion: true,
      requiredVersion: 'auto',
    },
  }),

  sharedMappings: ['shared1'],
});
